package it.koutifaris.travianmap.view.playerdetails;

import it.koutifaris.travianmap.context.ContextRetreiver;
import it.koutifaris.travianmap.model.Player;
import android.app.Activity;

class PlayerDetailsInitializer {

	protected final Activity activity;
	private final Player player;

	public PlayerDetailsInitializer(Player player) {
		activity = ContextRetreiver.contextRetreiver().getCurrentContext().getActivity();
		this.player = player;
	}

	public void initView(PlayerDetailsView view) {
		view.setPlayerName(player.getName());
		view.setAlliance(player.getAlliance().getName());
		view.setTribe(player.getTribe());

		view.getListView().setAdapter(new VillagesAdapter(player, view));
	}

}
